package org.yannis.app1.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/1/6.
 */
@RequestMapping("/")
@RestController
public class IndexController {

    @RequestMapping("/")
    public String index() {
        return "访问了首页哦";
    }

    @RequestMapping("/hello")
    public String hello() {
        return "不验证哦";
    }

    @RequestMapping("/security")
    public String security() {
        return "hello world security";
    }

    @RequestMapping("/admin")
    public String admin() {
        return "有权限访问";
    }

    @RequestMapping("/admin/view")
    public String adminView() {
        return "有权限访问";
    }

    @RequestMapping("/user")
    public String user() {
        return "user page";
    }

    @RequestMapping("/user/1")
    public String userDetail() {
        return "user detail";
    }

}
